package com.boyinet.demo.pipelineleakage.vo;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginResponse {

    private String status;
    private String type;
    private String currentAuthority;


    public static LoginResponse ok(String type) {
        return new LoginResponse("ok", type, "admin");
    }

    public static LoginResponse ok(String type, String currentAuthority) {
        return new LoginResponse("ok", type, currentAuthority);
    }

    public static LoginResponse error(String type) {
        return new LoginResponse("error", type, "guest");
    }

    public static LoginResponse error(String type, String currentAuthority) {
        return new LoginResponse("error", type, currentAuthority);
    }

}
